package com.meshnetics.gb.stack.core.apl;

import com.meshnetics.gb.event.EventListener;
import com.meshnetics.gb.stack.core.apl.type.EndPointAddress;

/**
 * Interface for all application objects.
 *
 * @author mmarkov
 */
public interface ApplicationObject {
    /**
     * Starts the application object.
     */
    public void start();

    /**
     * Stops the application object.
     */
    public void stop();

    /**
     * Sets endpoint which this Application object is attached to.
     *
     * @param ep new value of EndPointAddress
     */
    public void setEndPointAddress(EndPointAddress ep);

    /**
     * Returns the SimpleDescriptor of this application object.
     *
     * @return the SimpleDescriptor of this application object
     */
    public SimpleDescriptor getSimpleDescriptor();

    /**
     * Returns the EventListener of this application object for delivering incoming events from stack.
     *
     * @return the EventListener of this application object for delivering incoming events from stack
     */
    public EventListener getEventListener();
}
